<!DOCTYPE html>
<html>
<head>
    <title>订单基础信息表</title>
    <#include "/header.html">
    <!-- 文件上传 -->
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/oss/style.css">
    <script type="text/javascript" src="${request.contextPath}/statics/plugins/oss/js/plupload.full.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/statics/plugins/oss/ziyun_library.js"></script>
</head>
<style>
    #rrapp{
        word-break:break-all;
        overflow-x: hidden;
    }
    #rrapp .form-group span{
        vertical-align: sub;
        color: gray;
    }
    #rrapp .el-cascader{
        width: 100%;
    }
    .panel table tr{
        height: 30px;
    }
    .panel table tr td{
        vertical-align: middle !important;
    }
    a:link,a:visited{
        text-decoration:none;
    }
     .el-dialog__body{
    margin-left:-25px;
    } 
</style>
<body>

<div id="rrapp" v-cloak>
    <!-- 列表 start -->
    <div v-show="showList">
        <!-- 查询 start -->
        <div class="grid-btn">
            <form class="form-inline" role="form">
                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.orderId" @keyup.enter="query" placeholder="订单号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.parentOrderId" @keyup.enter="query" placeholder="父单号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.paymentId" @keyup.enter="query" placeholder="支付号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.memberName" @keyup.enter="query" placeholder="会员名">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.shipName" @keyup.enter="shipName" placeholder="收货人">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.shipTel" @keyup.enter="shipTel" placeholder="手机号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.status" @keyup.enter="query">
                        <option value="">订单状态</option>
                        <option v-for="item in e.orderInfoStatusEnum" :value="item.value">{{item.describe}}</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.auditStatus" @keyup.enter="query">
                        <option value="">审核状态</option>
                        <option value="0">待审核</option>
                        <option value="1">已审核</option>
                        <option value="2">异常单</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.payStatus" @keyup.enter="query">
                        <option value="">支付状态</option>
                        <option value="0">未支付</option>
                        <option value="1">已支付</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.supplierType" @keyup.enter="query">
                        <option value="">订单来源</option>
                        <option value="-1">全部</option>
                        <option value="0">紫云网</option>
                        <option value="1">第三方</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;" @keyup.enter="query" @click = "checkBeginDate" placeholder="开始时间"/>
                    至
                    <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"@keyup.enter="query" @click = "checkEndDate" placeholder="结束时间"/>
                </div>&nbsp;&nbsp;&nbsp;

                <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            </form>
        </div>
        <!-- 查询 end -->
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>
    <!-- 列表 end -->

    <div v-show="!showList">

        <!-- 操作 start-->
        <div class="panel-default" style="display: block;" align="center">
            <div style="padding: 5px 0;" class="container">
                <div class="row">
                    <div class="col-md-6 col-md-offset-3">
                        <div class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="reload">返回</button>
                        </div>
                        <#if shiro.hasPermission("order:orderinfo:orderfinish")>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderFinish(orderInfo.orderId)">完成</button>
                            </div>
                        </#if>
                        <div class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderPay">支付</button>
                        </div>
                        <div class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderInvalid(orderInfo.orderId)">作废</button>
                        </div>
                        <#if shiro.hasPermission("order:orderinfo:orderQuickInvalid")>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderQuickInvalid(orderInfo.orderId)">快捷作废</button>
                            </div>
                        </#if>
                        <div class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="applyService">售后</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 操作 end-->

        <!-- 订单信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>订单信息</strong></span>
            <span style="margin-right: 10px;" class="pull-right">
                <a href="javascript:;" @click="openShipForm"><i class="fa fa-edit"></i>&nbsp;修改收货人信息</a>
            </span>
        </div>
        <div class="panel panel-default">
            <table class="table">
                <tbody>
                <tr class="active">
                    <td>&nbsp;&nbsp;&nbsp;{{orderInfo.createtime}} &nbsp;&nbsp;&nbsp; 订单编号：{{orderInfo.orderId}}</td>
                </tr>
                </tbody>
            </table>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">供应商：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.sellerName}}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">会员名：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.memberName}}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">收货人：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.shipName}}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">联系方式：</div>
                                <div class="col-md-5"><span>{{orderInfo.shipMobile}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">交货时间：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.shipTime}}</span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">配送方式：</div>
                                <div class="col-md-6">
                                    <span>{{orderInfo.pickUp == true ? '自提' : '非自提'}}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">配送地区：</div>
                                <div class="col-md-6"><span>{{orderInfo.shipArea}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">地址：</div>
                                <div class="col-md-6"><span>{{orderInfo.shipAddr}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">邮编：</div>
                                <div class="col-md-6"><span>{{orderInfo.shipZip}}</span></div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">配送报价：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.costFreight}}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">商品重量：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.weight <= 0 ?  '' : orderInfo.weight}}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">获得积分：</div>
                                <div class="col-md-5">
                                    <span>{{orderInfo.scoreG}}</span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">顾客备注：</div>
                                <div class="col-md-6">
                                    <span>{{orderInfo.memo}}</span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 订单信息 end -->

        <!-- 商品信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>商品信息</strong></span>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td width="5%">序号</td>
                    <td width="5%">SPU</td>
                    <td>商品名称</td>
                    <td>是否加急</td>
                    <td width="30%">规格/尺寸/材质/工艺</td>
                    <td>类型</td>
                    <td>详情</td>
                    <td>数量</td>
                    <td>款式</td>
                    <td>单位</td>
                    <td>金额</td>
                    <td width="10%">源文件</td>
                    <td>需求描述</td>
                    <td>设计人</td>
                    <td>审核</td>
                    <td>修改</td>
                </tr>
                <tr class="text-center" v-for="(orderItem, index) in orderItemList" :key="orderItem.itemId">
                    <td>{{index+1}}</td>
                    <td>{{orderItem.goodsId}}</td>
                    <td>
                        <!-- 紫云网 -->
                        <a v-if="orderItem.stageType != 2" target="_blank" :href="'http://www.11ziyun.com/goods/' + orderItem.goodsId">{{orderItem.name}}</a>
                        <!-- POP平台 -->
                        <a v-else target="_blank" :href="'http://mall.11ziyun.com/mall/skuProductDetails.do?goodsId=' + orderItem.goodsId + '&goodsType=' + orderItem.goodsType">{{orderItem.name}}</a>
                    </td>
                    <td>
                        <span style="color: red" v-if="orderItem.urgent">是</span>
                        <span v-else>否</span>
                    </td>

                    <td style="text-align:left;">
                        <span v-if="(orderItem.goodsType == 'print' || orderItem.goodsType == 'fast') && orderInfo.promotionType != 'procurement'" v-parsing-addon="orderItem.addon"></span>
                        <span v-else>{{orderItem.addon}}</span>
                    </td>

                    <td>
                        <template v-for="item in e.goodsTypeEnum">
                            <template v-if="orderItem.goodsType == item.value">
                                {{item.describe}}
                            </template>
                        </template>
                    </td>
                    <td>
                        <el-button type="text" size="small" @click="showItemDetail(orderItem)" :disabled="(orderItem.goodsType != 'print' && orderItem.goodsType != 'fast') || orderInfo.promotionType == 'procurement'">查看</el-button>
                    </td>

                    <td>
                        <span v-if="orderItem.goodsType == 'print' || orderItem.goodsType == 'fast'" v-parsing-num="orderItem"></span>
                        <span v-else>{{orderItem.nums}}</span>
                    </td>

                    <td>
                        <span v-if="(orderItem.goodsType == 'print' || orderItem.goodsType == 'fast') && orderInfo.promotionType != 'procurement'">{{orderItem.nums}}</span>
                        <span v-else></span>
                    </td>

                    <td>{{orderItem.unit}}</td>
                    <td>{{orderItem.amount}}</td>
                    <td>
                        <el-badge class="item">
                            <el-button size="mini" type="text" :id="'upload'+ index" icon="el-icon-upload2">上传</el-button>
                        </el-badge>
                        &nbsp;&nbsp;
                        <el-badge :value="orderItem.fileNums" class="item">
                            <el-button size="mini" type="text" @click="itemFileShow(index)" icon="el-icon-download">下载</el-button>
                        </el-badge>
                    </td>
                    <td style="text-align:left;">{{orderItem.reqDesc == null ? '' : orderItem.reqDesc}}</td>
                    <td>{{orderItem.designer == null ? '' : orderItem.designer}}</td>
                    <!-- 企业集采订单（先审核后支付） -->
                    <template v-if="orderInfo.promotionType == 'procurement'">
                        <td>
                            <div v-if="orderInfo.payStatus == '6'">
                                <a href="javascript:;" v-if="(isBlank(orderItem.status) || orderItem.status == 0)" @click="orderItemAuditShow(index)">审核</a>
                                <span class="text-success" v-else>已审核</span>
                            </div>
                            <div v-else>
                                <span class="text-fail" >已审核</span>
                            </div>
                        </td>
                        <td>
                            <a href="javascript:;" v-if="orderInfo.payStatus != '1'" @click="itemUpdate(index)">修改</a>
                        </td>
                    </template>
                    <!-- 其他订单（先支付后审核） -->
                    <template v-else>
                        <td>
                            <div v-if="orderInfo.payStatus == '1'">
                                <a href="javascript:;" v-if="(isBlank(orderItem.status) || orderItem.status == 0)" @click="orderItemAuditShow(index)">审核</a>
                                <span class="text-success" v-else>已审核</span>
                            </div>
                            <div v-else>
                                <span class="text-fail" >未审核</span>
                            </div>
                        </td>
                        <td></td>
                    </template>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 商品信息 end -->

        <!-- 费用明细 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>费用明细</strong></span>
            <span style="margin-right: 10px;" class="pull-right" v-show="orderInfo.payStatus != '1'">
                <a href="javascript:;" @click="costFormVisible = true"><i class="fa fa-edit"></i>&nbsp;修改信息</a>
            </span>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td>商品总额</td>
                    <td>配送费用</td>
                    <td>调价</td>
                    <td>商品促销优惠</td>
                    <td>优惠券</td>
                    <td>随机立减</td>
                    <td>运费保险</td>
                    <td>应支付额</td>
                    <td>已支付额</td>
                </tr>
                <tr class="text-center">
                    <td>{{orderInfo.totalAmount}}</td>
                    <td>{{orderInfo.costFreight}}</td>
                    <td>{{orderInfo.discount}}</td>
                    <td>{{orderInfo.pmtGoods}}</td>
                    <td>{{orderInfo.pmtOrder}}</td>
                    <td>{{orderInfo.pmtRandom}}</td>
                    <td></td>
                    <td>{{orderInfo.payableAmount}}</td>
                    <td>{{orderInfo.payed}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 费用明细 end -->

        <!-- 支付信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>支付信息</strong></span>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td>支付单号</td>
                    <td>支付类型</td>
                    <td>支付金额</td>
                    <td>支付时间</td>
                </tr>
                <tr class="text-center" v-for="(userPayment, index) in userPaymentList">
                    <td>{{userPayment.paymentId}}</td>
                    <td>{{userPayment.payName}}</td>
                    <td>{{userPayment.money}}</td>
                    <td>{{userPayment.tpayed}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 支付信息 end -->

        <!-- 发票信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>发票信息</strong></span>
            <span style="margin-right: 10px;" class="pull-right">
               <a href="javascript:;" @click="openInvoiceFrom"><i class="fa fa-edit"></i>&nbsp;修改信息</a>
            
            </span>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td>发票类型</td>
                    <td>纳税人识别号</td>
                    <td>发票内容</td>
                    <td>注册地址</td>
                    <td>发票抬头</td>
                    <td>注册电话</td>
                    <!--<td>发票种类</td>-->
                    <td>开户银行</td>
                    <td>银行账户</td>
                    <!--<td>税金</td>-->
                </tr>
                <tr class="text-center">
                    <td>
                        <template v-for="item in e.taxTypeEnum">
                            <template v-if="item.value == orderInfo.taxType">
                                {{item.describe}}
                            </template>
                        </template>
                    </td>
                    <td>{{orderInfo.taxIdentification}}</td>
                    <td>{{orderInfo.taxContent}}</td>
                    <td>{{orderInfo.taxAddr}}</td>
                    <td>{{orderInfo.taxCompany}}</td>
                    <td>{{orderInfo.taxTel}}</td>
                    <td>{{orderInfo.taxAccountName}}</td>
                    <td>{{orderInfo.taxNumber}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 发票信息 end -->

        <!-- 订单备注 订单日志 start -->
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-4">
                        <!-- 订单备注 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>订单备注</strong></span>
                        </div>
                        <div class="panel panel-default">
                            <table class="table table-bordered">
                                <tbody>
                                <tr class="text-center active">
                                    <td>时间</td>
                                    <td>操作人</td>
                                    <td>操作内容</td>
                                </tr>
                                <tr class="text-center" v-for="(remark, index) in orderRemarks">
                                    <td>{{remark.orCreateTime}}</td>
                                    <td>{{remark.orCreateNameVal}}</td>
                                    <td style="text-align:left;">{{remark.orRemarks}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <!-- 订单备注 end -->
                    </div>
                    <div class="col-md-4">
                        <!-- 订单日志 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>商城日志</strong></span>
                        </div>
                        <table class="table table-bordered">
                            <tbody>
                            <tr class="text-center active">
                                <td>时间</td>
                                <td>操作人</td>
                                <td>操作内容</td>
                            </tr>
                            <tr class="text-center" v-for="(log, index) in orderLogs">
                                <td>{{log.alttime}}</td>
                                <td>{{log.name}}</td>
                                <td>{{log.logText}}</td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- 订单日志 end -->
                    </div>
                    <div class="col-md-4">
                        <!-- 订单日志 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>订单日志</strong></span>
                        </div>
                        <table class="table table-bordered">
                            <tbody>
                            <tr class="text-center active">
                                <td>时间</td>
                                <td>操作人</td>
                                <td>操作内容</td>
                            </tr>
                            <tr class="text-center" v-for="(log, index) in erpOrderLogs">
                                <td>{{log.createTime}}</td>
                                <td>{{log.createName}}</td>
                                <td>{{log.logText}}</td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- 订单日志 end -->
                    </div>
                </div>
            </div>
        </div>
        <!-- 订单备注 订单日志 end -->

        <!-- 生产信息 物流信息 start -->
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-6">
                        <!-- 生产信息 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>生产信息</strong></span>
                        </div>
                        <div class="panel panel-default">
                            <table class="table table-bordered">
                                <tbody>
                                <tr class="text-center active">
                                    <td>订单号</td>
                                    <td>生产状态</td>
                                    <td>生产商</td>
                                    <td>生产成本</td>
                                    <td>第三方单号</td>
                                    <td>创建时间</td>
                                </tr>
                                <tr class="text-center" v-for="(item, index) in erpOrderProductionEntityList">
                                    <td>{{item.orderNo}}</td>
                                    <!--生产状态:1.待生产,2.生产中,3.生产完成,4.取消-->
                                    <td v-if="item.productionStatus==1">待生产</td><td v-else-if="item.productionStatus==2">生产中</td><td v-else-if="item.productionStatus==3">生产完成</td><td v-else-if="item.productionStatus==4">取消</td>
                                    <td>{{item.sellerName}}</td>
                                    <td>{{item.cost}}</td>
                                    <td>{{item.productionOrder}}</td>
                                    <td>{{item.createTime}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <!-- 生产信息 end -->
                    </div>
                    <div class="col-md-6">
                        <!-- 物流信息 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>物流信息</strong></span>
                        </div>
                        <table class="table table-bordered">
                            <tbody>
                            <tr class="text-center active">
                                <td>订单号</td>
                                <td>物流公司</td>
                                <td>物流单号</td>
                                <td>创建人</td>
                                <td>创建时间</td>
                            </tr>
                            <tr class="text-center" v-for="(item, index) in orderLogisticsEntityList">
                                <td>{{item.orderId}}</td>
                                <td>{{item.logiCompany}}</td>
                                <td>{{item.logiNo}}</td>
                                <td>{{item.createName}}</td>
                                <td>{{item.createTime}}</td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- 物流信息 end -->
                    </div>
                </div>
            </div>
        </div>
        <!-- 生产信息 物流信息 end -->

        <!-- 处理人员 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>处理人员</strong></span>
        </div>
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="col-md-2">
                    <strong>审批人：</strong><span style="color: grey;">{{orderServicer == null ? '' : orderServicer.auditName}}</span>
                </div>
                <div class="col-md-2">
                    <strong>客服：</strong><span style="color: grey;">{{orderServicer == null ? '' : orderServicer.csName}}</span>
                </div>
                <div class="col-md-2">
                    <strong>跟单员：</strong><span style="color: grey;">{{orderServicer == null ? '' : orderServicer.pmcName}}</span>
                </div>
            </div>
        </div>
        <!-- 处理人员 end -->

    </div>

    <!-- 修改收货人信息 -->
    <el-dialog title="修改收货人信息" :visible.sync="shipFormVisible" width= "40%">
        <el-form :model="shipForm" size="medium">

            <el-form-item label="收货人：" :label-width="formLabelWidth">
                <el-input v-model.trim="shipForm.shipName" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="联系方式：" :label-width="formLabelWidth">
                <el-input v-model.trim="shipForm.shipMobile" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="配送地区：" :label-width="formLabelWidth">
                <el-cascader v-model="shipForm.areaCascader" placeholder="试试搜索：武汉市" :options="options" filterable @change="handleItemChange"></el-cascader>
            </el-form-item>

            <el-form-item label="地址：" :label-width="formLabelWidth">
                <el-input v-model.trim="shipForm.shipAddr" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="邮编：" :label-width="formLabelWidth">
                <el-input v-model.trim="shipForm.shipZip" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="配送方式：" :label-width="formLabelWidth">
                <el-radio v-model="shipForm.sendType" label="0">非自提</el-radio>
                <el-radio v-model="shipForm.sendType" label="1">自提</el-radio>
            </el-form-item>

            <el-form-item label="配送报价：" :label-width="formLabelWidth">
                <el-input type="number" v-model="shipForm.costFreight" auto-complete="off"></el-input>
            </el-form-item>

        </el-form>

        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="shipFormVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="changeShipInfo">确 定</el-button>
        </div>
    </el-dialog>

    <!--商品审核 -->
    <el-dialog title="商品审核" :visible.sync="itemAuditVisible"  width="35%" center>
        <el-form size="medium">
            <el-form-item label="商品类型：" label-width="120px">
                <template v-for="item in e.goodsTypeEnum">
                    <template v-if="orderItem.goodsType == item.value">
                        {{item.describe}}
                    </template>
                </template>
            </el-form-item>

            <el-form-item label="订单号：" label-width="120px">
                {{orderItem.orderId}}
            </el-form-item>

            <el-form-item label="商品名称：" label-width="120px">
                {{orderItem.name}}
            </el-form-item>

            <el-form-item label="收货人：" label-width="120px">
                {{orderInfo.shipName}}
            </el-form-item>

            <el-form-item label="收货地区：" label-width="120px">
                {{orderInfo.shipArea}}
            </el-form-item>

            <!-- 设计商品 -->
            <el-form-item v-if="orderItem.goodsType == 'design'" label="设计需求：" label-width="120px">
                {{orderItem.name}}
            </el-form-item>

            <!-- 设计商品 -->
            <el-form-item v-if="orderItem.goodsType == 'design'" label="设计师：" label-width="120px">
                <el-select
                        size="small"
                        v-model="audit.desigener"
                        filterable
                        clearable
                        remote
                        reserve-keyword
                        placeholder="请输入设计师名称"
                        :remote-method="getDesignerData"
                        :loading="designerLoading">
                    <el-option
                            v-for="(item, index) in userBaseInfos"
                            :key="item.userId + ''"
                            :label="item.name"
                            :value="item.userId + ''">
                    </el-option>
                </el-select>
            </el-form-item>

            <el-form-item label="备注：" label-width="120px">
                <el-input type="textarea" maxLength="200" v-model="audit.remark" placeholder="请填写备注，200字以内"></el-input>
            </el-form-item>

            <el-form-item label="审核：" label-width="120px">
                <el-checkbox v-model="audit.approvalStatus" label="1">审核通过</el-checkbox>
            </el-form-item>

        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="itemAuditVisible = false">取消</el-button>
            <el-button size="small" type="primary" @click="orderItemAudit()">确 定</el-button>
        </div>
    </el-dialog>

    <!-- 订单支付 -->
    <div id="orderPayLayer" style="display: none;">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span6">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <div class="col-md-3 control-label">订单号：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{orderInfo.orderId}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">银行账户选择：</div>
                            <div class="col-md-9">
                                <select class="form-control" @change="receiptsAccountsChange($event)">
                                    <option value="">---请选择---</option>
                                    <option v-for="(item, index) in receiptsAccounts"  :value="index">{{ item.fraBank + '--' + item.fraAccount }}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">收款银行：</div>
                            <div class="col-md-9">
                                <input type="text" v-model="pay.bank" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">客户应付金额：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{orderInfo.payableAmount}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">付款人：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{username}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">支付方式：</div>
                            <div class="col-md-9">
                                <select class="form-control" v-model="pay.payAppId" @change="payTypeChange">
                                    <option value="">---请选择---</option>
                                    <option v-for="(item, index) in e.payTypeEnum" :value="item.value">{{ item.describe }}</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-3 control-label">下单时间：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{orderInfo.createtime}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">收款账户：</div>
                            <div class="col-md-9">
                                <input type="text" v-model="pay.account" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">客户支付时间：</div>
                            <div class="col-md-9">
                                <input class="form-control" v-model="pay.tPayed" readonly="readonly" @click = "checkPayDate"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">支付金额：</div>
                            <div class="col-md-9">
                                <input type="text" v-model="pay.money" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">备注：</div>
                            <div class="col-md-9">
                                <textarea class="form-control" rows="3" maxlength="200" v-model="pay.memo" placeholder="请填写备注内容，200字以内"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- 文件下载列表 -->
    <el-dialog title="商品文件下载" :visible.sync="fileTableVisible" width= "40%">
        <el-table border stripe ref="multipleTable" :data="itemFile.itemFiles" tooltip-effect="dark" size="mini">
            <el-table-column property="goodsName" label="商品名称"></el-table-column>
            <el-table-column v-if="false" property="id" label="文件ID"></el-table-column>
            <el-table-column property="name" label="文件名"></el-table-column>
            <el-table-column property="size" label="文件大小"></el-table-column>
            <el-table-column label="操作">
                <template slot-scope="scope">
                    <el-row>
                        <el-button @click="itemSourceFileDownload(scope.row)" type="text" size="mini" icon="el-icon-download">下载</el-button>
                        <el-button @click="itemFileDelete(scope.row)" type="text" size="mini" icon="el-icon-delete">删除</el-button>
                    </el-row>
                </template>
            </el-table-column>
        </el-table>

    </el-dialog>

    <!-- 修改发票信息 -->
    <el-dialog title="修改发票信息" :visible.sync="invoiceFormVisible"  width="35%" center>
       <el-form ref="invoiceFrom" :model="invoiceFrom" size="medium">
          <el-form-item label="发票类型" :label-width="formLabelWidth" prop="taxType"
            :rules ="[{ required: true, message: '发票类型 最少选着一条', trigger: 'change'}]" >
             <el-select v-model="invoiceFrom.taxType" placeholder="请选择发票类别" style="width:100%" clearable>
               <el-option label="个人发票" value="personal"></el-option>
               <el-option label="公司普通发票" value="companyOrdinary"></el-option>
               <el-option label="专票" value="companySpecial"></el-option>
             </el-select>
          </el-form-item>
          <el-form-item label="纳税人识别号" :label-width="formLabelWidth" prop="taxIdentification"
          :rules ="[{ required: true, message: '请填写纳税人识别号'}]">
              <el-input  v-model="invoiceFrom.taxIdentification" autocomplete="off" clearable></el-input>
          </el-form-item>
           <el-form-item label="发票内容" :label-width="formLabelWidth" prop="taxContent">
             <el-select v-model="invoiceFrom.taxContent" placeholder="请选择内容" style="width:100%" clearable>
               <el-option  v-for="textV in e.taxContentEnum" :label="textV.text"
               :selected="textV.text ==invoiceFrom.taxContent" :value="textV.text">{{textV.text}}</el-option>
             </el-select>
          </el-form-item>
           <el-form-item label="注册地址" :label-width="formLabelWidth" prop="taxAddr">
              <el-input v-model="invoiceFrom.taxAddr" autocomplete="off" clearable></el-input>
          </el-form-item>
           <el-form-item label="发票抬头" :label-width="formLabelWidth"  prop="taxCompany"
           :rules ="[{ required: true, message: '请填写发票抬头'}]">
              <el-input v-model="invoiceFrom.taxCompany" autocomplete="off" clearable></el-input>
          </el-form-item>
           <el-form-item label="注册电话" :label-width="formLabelWidth" prop="taxTel">
              <el-input v-model="invoiceFrom.taxTel" autocomplete="off" clearable></el-input>
          </el-form-item>
        <!--   <el-form-item label="发票种类" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
          </el-form-item>  -->
           <el-form-item label="开户银行" :label-width="formLabelWidth" prop="taxAccountName">
              <el-input v-model="invoiceFrom.taxAccountName" autocomplete="off" clearable></el-input>
          </el-form-item>
           <el-form-item label="银行账户" :label-width="formLabelWidth" prop="taxNumber">
              <el-input v-model="invoiceFrom.taxNumber" autocomplete="off" clearable></el-input>
           </el-form-item>
          <!--   <el-form-item label="税金" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
           </el-form-item> -->
       </el-form>
         <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="resetForm('invoiceFrom')">重置</el-button>
            <el-button size="small" type="primary" @click="changeTaxInfo('invoiceFrom')">确 定</el-button>
          </div>
 </el-dialog>

    <!-- 修改费用明细 -->
    <el-dialog title="订单调价" :visible.sync="costFormVisible" width= "30%">
        <el-form :model="costForm" size="medium">
            <el-form-item label="调价：" :label-width="formLabelWidth">
                <el-input type="number" v-model="costForm.discount" auto-complete="off"></el-input>
                <div style="color: #909399">提示：要给顾客便宜100元，则输入"-100"；要提高订单价格100元，则输入"100"。</div>
            </el-form-item>
            <el-form-item label="备注：" :label-width="formLabelWidth">
                <el-input type="textarea" maxLength="200" v-model="costForm.remark" placeholder="请填写备注，200字以内"></el-input>
                <div style="color: #F56C6C">注：请填写改价原因。</div>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="costFormVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="changeCost">确 定</el-button>
        </div>
    </el-dialog>

    <!-- 修改商品信息 -->
    <div id="orderItemLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">

                <div class="form-group">
                    <div class="col-md-3 control-label">商品名称：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{itemForm.name}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">价格：</div>
                    <div class="col-md-9">
                        <input type="number" class="form-control" v-model.trim="itemForm.price" @change="itemPriceChange" placeholder="价格"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">购买数量：</div>
                    <div class="col-md-9">
                        <input type="number" class="form-control" v-model.trim="itemForm.nums" @change="itemPriceChange" placeholder="购买数量"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">小计：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{itemForm.amount}}</span>
                    </div>
                </div>

            </div>
        </form>
    </div>

    <!-- 备注 -->
    <div id="remarksLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-md-3 control-label">订单号：</div>
                    <span style="vertical-align: sub;color: grey">{{pub.orderId}}</span>
                </div>
                <div class="form-group">
                    <div class="col-md-10 col-md-offset-1">
                        <textarea class="form-control" maxlength="200" rows="3" v-model.trim="pub.remark" placeholder="请填写备注内容，200字以内"></textarea>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <!-- 是否开发票 -->
    <div id="taxLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-md-3 control-label">订单号：</div>
                    <span style="vertical-align: sub;color: grey">{{taxForm.orderId}}</span>
                </div>
                <div class="form-group">
                    <div class="col-md-3 control-label">是否开发票：</div>
                    <el-radio v-model="taxForm.sendTax" label="0">不开</el-radio>
                    <el-radio v-model="taxForm.sendTax" label="1">开</el-radio>
                </div>
            </div>
        </form>
    </div>

</div>
<#include "/modules/service/serviceRegisterPage.html">
<!-- 报价商品算价详情 -->
<#include "/modules/order/itemQuoteDetail.html">
<script src="${request.contextPath}/statics/js/modules/order/orderinfo.js?_${.now?long}"></script>
</body>
</html>
